package cn.piesat.scanning.service.impl;

import cn.piesat.scanning.dao.DbDmsSchedulerTaskRecordLogDAO;
import cn.piesat.scanning.dto.DbDmsSchedulerTaskRecordLogDTO;
import cn.piesat.scanning.service.DbDmsSchedulerTaskRecordLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 任务执行记录日志服务层实现
 *
 * @author xhl
 * @date 2020/12/11 17:41
 */
@Service
public class DbDmsSchedulerTaskRecordLogServiceImpl implements DbDmsSchedulerTaskRecordLogService {

    @Autowired
    private DbDmsSchedulerTaskRecordLogDAO dbDmsSchedulerTaskRecordLogDAO;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteByRid(String rid) {
        dbDmsSchedulerTaskRecordLogDAO.deleteByRid(rid);
    }

    @Override
    public List<DbDmsSchedulerTaskRecordLogDTO> findByRid(String rid) {
        return dbDmsSchedulerTaskRecordLogDAO.findByRid(rid);
    }

    @Override
    public void saveAll(List<DbDmsSchedulerTaskRecordLogDTO> dataList) {
        dbDmsSchedulerTaskRecordLogDAO.saveAll(dataList);
    }

}
